function loginStat()
{
    var xmlhttp   = new Ajax();
    var url       = "http://localhost/jiajia/nanbeihuo/index.php?controller=users&action=currentuser";
    var postStr   = "";
    xmlhttp.request(url, "post", false, postStr,funHandleResult,emptyFunc,emptyFunc);
    return false;
}

function emptyFunc()
{
}

function funHandleResult(response)
{
    eval(response);
}

function login_callback(response)
{
	var userStat = document.getElementById('Users');
	var status = response.stat;
	switch(status)
	{
		case "true":
			document.getElementById("userstat").innerHTML ="欢迎"+response.user+",请选择你需要的商品。&nbsp"+"<a href=\"index.php?controller=users&action=logout\"><b>[安全退出]</b></a>";
//			userStat = "欢迎"+response.user+",请选择你需要的商品";
			break;
		case "false":
			//document.getElementById("userstat").innerHTML = "欢迎光临家嘉为你送！<a href=\"login.html\"><b>[请登录]</b></a> ，新用户？<a href=\"register.html\"><b>[免费注册]</b></a>";
//			userStat = "<a href=\"login.html\">[登录]</a> <a href=\"users/register\">[注册]</a>";
			break;
	}
//	alert(userStat.innerText);
}
